package com.xianggu.demo.pattern.chair;

/**
 * 部门经理审批者
 */
class DepartmentManagerApprover extends Approver {
    public DepartmentManagerApprover(Approver successor) {
        super(successor);
    }

    @Override
    public void processRequest(LeaveRequest request) {
        if (request.getLeaveDays() <= 7) {
            System.out.println("部门经理审批通过，请假天数: " + request.getLeaveDays());
        } else if (successor!= null) {
            successor.processRequest(request);
        }
    }
}